﻿@using System.Linq
@inject IPageService pageService
@{
    ViewData["Title"] = "页面 管理";

}
@section links
    {
}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content text-center p-md ibox-content-search">
                    <form class="form-horizontal" datatable="tableGrid">
                        @*<div class="form-group col-md-4">
                                <label for="LocalName" class="col-md-2 control-label text-right">名称</label>
                                <div class="col-md-9">
                                    <input id="LocalName" name="LocalName" class="form-control" placeholder="名称" />
                                </div>
                            </div>
                            <div class="form-group col-md-4">
                                <label for="RouteUrl" class="col-md-2 control-label text-right">路径</label>
                                <div class="col-md-9">
                                    <input id="RouteUrl" name="RouteUrl" class="form-control" placeholder="路径" />
                                </div>
                            </div>*@
                        <div>


                            <a class="btn  btn-danger  pull-right btn-rounded btn-outline btn-delete"><i class="fa fa-trash"></i>删  除</a>
                            <label class="pull-right">&nbsp; &nbsp;</label>
                            <a class="btn btn-primary pull-right btn-rounded btn-outline btn-init-page"><i class="fa "></i>初始化菜单</a>
                            <label class="pull-right">&nbsp; &nbsp;</label>
                            <a class="btn btn-primary pull-right btn-rounded btn-outline" asp-action="Edit"><i class="fa fa-plus"></i>新  增</a>
                            @*<label class="pull-right">&nbsp; &nbsp;</label>
                                <a class="btn btn-primary pull-right btn-rounded btn-search"><i class="fa fa-search"></i>搜  索</a>*@
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content text-center p-md">
                    <div class="table-responsive ">
                        <table class="table table-bordered table-hover dataTables dataTable " id="tableGrid">
                            <thead>
                                <tr role="row">
                                    <td>
                                        <div class="i-checks checkall">
                                            <label> <input type="checkbox" class="thead " title="全选" /></label>
                                        </div>
                                    </td>
                                    <td class="sorting">页面名称</td>

                                    <td class="sorting">排序</td>
                                    <td class="sorting">修改时间</td>
                                    <td class="sorting">路径</td>
                                    <td class="sorting"></td>

                                </tr>

                            </thead>
                            <tbody></tbody>
                            <tfoot>

                                <tr>

                                    <td>
                                        <div class="i-checks checkall">
                                            <label> <input type="checkbox" class="tfoot " title="全选" /></label>
                                        </div>
                                    </td>
                                    <td class="sorting">页面名称</td>

                                    <td class="sorting">排序</td>
                                    <td class="sorting">修改时间</td>
                                    <td class="sorting">路径</td>
                                    <td class="sorting"></td>

                                </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@section scripts{
    
    <script type="text/javascript">
        BaseUrl = "@Url.Content("~/admin")";
        $(document).ready(function () {
            Page.Init();
            $(".btn-init-page").click(function () {
                Notify.Confirm("同步后会将现有的权限以及页面全部删除，需要重新分配","确定提示", function () {
                 Ajax({
                url: "@Url.Action("initpage")",
                success: function (result) {
                    Notify.Success("初始化成功");
                }
            });
            });
            });


        });


    </script>

}
